set the visible of sprite the pPictureSprite of gScript to 0
go("about")
puppetAllSprites(1)
initText()
initControls()
end
on closeAboutScreen
puppetAllSprites(0)
put " " into field "textDisplay"
if not objectp(gScript) then
exit
end if
cleanUpBeforeLeaving()
repeat with i = 1 to count(gScript)
setaProp(gScript, getPropAt(gScript, i), gVoid)
end repeat
set gScript to gVoid
end
on initControls
set the pButtonObjectList of gScript to [:]
set the pSectButtonSpriteList of gScript to [10, 11, 12]
set the pSectButtonFirstMemNum of gScript to the number of member "top01"
set tDisplayPropsOne to [#member: member "g7107", #text: #profile]
set tDisplayPropsTwo to [#member: member "g7201", #text: #cust]
set tDisplayPropsTre to [#member: member "g7301", #text: #globe]
set tCommandList to ["displayInfo(" & tDisplayPropsOne & ")", "displayInfo(" & tDisplayPropsTwo & ")", "displayInfo(" & tDisplayPropsTre & ")"]
repeat with i = 1 to count(the pSectButtonSpriteList of gScript)
set currSpriteNum to getAt(the pSectButtonSpriteList of gScript, i)
addProp(the pButtonObjectList of gScript, currSpriteNum, birth(script "sectButton Parent Script", currSpriteNum, the pSectButtonFirstMemNum of gScript + ((i * 3) - 3), i, getAt(tCommandList, i)))
end repeat
set tBar to 6
set tTop to 7
set tBot to 8
set tThm to 9
set the pThumbSprite of gScript to tThm
set tStdButtonList to [[#sprite: tBar, #firstMember: the number of member "scrbar01", #command: "mClickScrollBar(the pScrollBarObj of gScript)", #repeat: 1, #down: 1, #delay: 15], [#sprite: tTop, #firstMember: the number of member "scrtop01", #command: "mClickUpArrow(the pScrollBarObj of gScript)", #repeat: 1, #down: 1, #delay: 15], [#sprite: tBot, #firstMember: the number of member "scrbot01", #command: "mClickDownArrow(the pScrollBarObj of gScript)", #repeat: 1, #down: 1, #delay: 15], [#sprite: tThm, #firstMember: the number of member "scrthm01", #command: "mClickBoxButton(the pScrollBarObj of gScript)", #repeat: 1, #down: 1, #forceRoll: 1]]
repeat with tCurrButtonProps in tStdButtonList
addProp(the pButtonObjectList of gScript, the sprite of tCurrButtonProps, new(script "stdButtonClass", tCurrButtonProps))
end repeat
updateStage()
set the pScrollBarObj of gScript to new(script "ScrollBarClass", [#pTopArrowSprite: tTop, #pBotArrowSprite: tBot, #pBoxButtonSprite: tThm, #pScrollBarSprite: tBar, #pFieldMember: member "textDisplay"])
mClickOnButton(getaProp(the pButtonObjectList of gScript, 10), "Mouse Down", 1)
end
on initText
set tFileList to [#profile: "profile.txt", #cust: "cust.txt", #globe: "globe.txt"]
set the pDisplayTextList of gScript to [:]
if not doesXtraExist("fileio") then
alert("The FileIO Xtra is not in the Xtras directory.")
exit
end if
set tFileIO to new(xtra("fileio"))
if not objectp(tFileIO) then
alert("Problem using FileIO Xtra, check to make sure it's there ...")
exit
end if
repeat with i = 1 to count(tFileList)
set tFileName to the pathName & getAt(tFileList, i)
openFile(tFileIO, tFileName, 1)
set tString to readFile(tFileIO)
set tStatus to status(tFileIO)
closeFile(tFileIO)
set tCurrProp to getPropAt(tFileList, i)
if tStatus <> 0 then
addProp(the pDisplayTextList of gScript, tCurrProp, "Couldn't load text file: " & tFileName)
next repeat
end if
set tString to removeLFCharFromText(tString)
addProp(the pDisplayTextList of gScript, tCurrProp, tString)
end repeat
set tFileIO to 0
end
on cleanUpBeforeLeaving
if listp(the pButtonObjectList of gScript) then
repeat with i = 1 to count(the pButtonObjectList of gScript)
set tActPos to getPos(the actorList, getAt(the pButtonObjectList of gScript, i))
if tActPos > 0 then
deleteAt(the actorList, tActPos)
end if
end repeat
end if
set the pButtonObjectList of gScript to [:]
end
on displayInfo myProps
set the member of sprite the pPictureSprite of gScript to the member of myProps
set the visible of sprite the pPictureSprite of gScript to 1
put getaProp(the pDisplayTextList of gScript, the text of myProps) into field "textDisplay"